<?php if(!IS_AJAX){?>

<include file="Public:header" />
<div class="row">
  <div class="col-sm-12">
    <section class="panel">
      <div class="panel-body">
        <table class="table-bordered table" width="100%" border="0" cellspacing="0" cellpadding="0">
 <thead>
<tr>
            <td align="center">ID</td>
            <td align="center">名称</td> 
            <td align="center">图片</td>
            <td align="center">价格</td>
            <td align="center">操作</td>
          </tr>
</thead>
          <tbody class="ajaxdatalist" id="ajaxdatalist">
            <?php }?>
            
            
            
            <?php if(IS_AJAX){?>
            <!-- 数据主体 -->
        <notempty name="list">    
            


<volist name="list" id="vo">
          <tr class="data_list">
            <td align="center"><input type="checkbox" name="id" id="id" class="sall" value="{$vo.id}" />
             </td>
            <td> <span class="ajaxText" tablename="Product" field="title" id="{$vo.id}" val="{$vo.title}">{$vo.title}</span></td>
            <td><img src="{:getThumbPath($vo['img_url'])}" width="50" /></td>
            <td align="center">
            <volist name="vo['price']" id="pvo">
          <eq name="pvo['num']" value="0">
              <p>无限时：{$pvo.price}元<br/></p>
              <else/>
              <p>{$pvo.num}个月：{$pvo.price}元/月<br /></p>
              
          </eq>
          

      </volist>
            </td>
            
            <td align="center">
            <notempty name="vo['product_id']">
            <a class="OptionBtn" href="javascript:void(0);" width="600" title="编辑产品" rel="{:U('Product/edit', array('id' => $vo['product_id']))}">编辑</a>
            <else/>
            <a href="{:U('setProduct',array('id'=>$vo['id']))}" class="btn btn-success">上架</a>
            </notempty>
            
            </td>
          </tr>
        </volist>
<else/>
<tr>
<td colspan="5" align="center">暂无产品信息</td>
</tr>
</notempty>


            <?php }?>
            <!-- 数据主体结束 -->
            
            <?php if(!IS_AJAX){?>
          </tbody>
        </table>
        <div id="ajaxdatalistpages"></div>
      </div>
    </section>
  </div>

</div>
<include file="Public:footer" />
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Js/ueditor/ueditor.config.js"></script> 
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Js/ueditor/ueditor.all.min.js"> </script> 
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/Js/ueditor/lang/zh-cn/zh-cn.js"></script>
<form action="" id="ajaxdatalistform"></form>
<style>
    .option a.btn{margin-top:5px;}
</style>
</body></html><?php }?>